import tpl from './index.tpl'

import './index.scss'

import logo from './logo'
import nav from './nav'

import { tplReplace } from '../../utils'

export default (fields) => {
    const logoComp = logo()
    const navComp = nav()

    return {
        name: 'header',
        tpl() {


            return tplReplace(tpl, {
                logo: logoComp.tpl(),
                nav: navComp.tpl(fields)                
            })
         
        }
    }
}